<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@include file="../common/script.jsp" %>
<script type="text/javascript">
    var rules=new Array();
    rules[0]='j_username|required|Please Enter UserName';
    rules[1]='j_password|required|Please Enter Password';  
</script>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="../common/title.jsp"%>
         <link rel="stylesheet" type="text/css" href="../css/login.css" media="screen">
    </head>

    <body onload="document.getElementById('j_username').focus();yav.init('form1',rules,'inline');">
        
          <!-- start wrapper -->
        <div id="wrapper">

            <!-- start page_01 -->
            <div  id="page_01">              
                
                <form action="../j_spring_security_check" method="post" class="loginform" name="form1" >
            <fieldset> 
                <p>
                <label for="j_username"><spring:message code="username"/></label>
                <input id="j_username" name="j_username" value="${sessionScope[SPRING_SECURITY_LAST_USERNAME]}" type="text" /><br/>
                <span id="errorsDiv_j_username"></span>
            </p>
            <p>
                <label for="j_password"><spring:message code="password"/></label>
                <input id="j_password" name="j_password" type="password" /><br/>
                <span id="errorsDiv_j_password"></span>
            </p>
            <p><input  type="submit" value="<spring:message code="button.Login"/>" onclick="return yav.performCheck('form1', rules, 'inline');"/>
            <br/><br/>
            <c:if test="${param.login_error=='true'}">
                <span style="color: red">${sessionScope["SPRING_SECURITY_LAST_EXCEPTION"].message}</span>
            </c:if>
            <c:if test="${param.errorMsg=='locked'}">
                <span style="color: red; width: 100%;">Your account has been locked. Please contact an Administrator.</span>
            </c:if>
            <c:if test="${param.errorMsg=='credentials'}">
                <span style="color: red">Incorrect username or password entered.</span>
            </c:if></p></fieldset>
            
                     <!-- start powered by -->
                    <div class="designby">
                        <span style="float:left; position:relative;">Designed and built by Yogesh</span>
                        <span  style="float:right; position:relative;">0.1</span>
                    </div>
                    <!-- end powered by -->  

                    <div class="browser_wrapper">
                        <div class="browser"> <span style="float:left; position:relative; margin:0;  padding:10px 0; text-align:left;">Best viewed with : </span> <span class="firefox">Firefox</span> <span class="chrome">Chrome</span> <span class="safari">Safari</span></div>
                    </div> 

        </form>
            </div>
        </div>
    </body>
</html>